use stocks
go
select top 100 MarketName, ticker, [Close], [1dpc], [2DPC], [5DPC], [10DPC], [30DPC] from DailyStatsPerStock as stat
inner join dbo.DailyDetail as dd 
inner join dbo.Market as m on m.MarketId = dd.MarketId
on dd.Id = stat.DailyDetailId
order by [5dpc] desc

select top 1000 * from DailyDetail where Ticker= 'ZVUEW'
order by date desC

SELECT [Id]
      ,[Ticker]
      ,[Per]
      ,[Date]
      ,[Open]
      ,[High]
      ,[Low]
      ,[Close]
      ,[Vol]
      ,[Oi]
      ,[MarketId]
  FROM [Stocks].[dbo].[DailyDetail]
where Ticker = 'PGNX'
delete from  [Stocks].[dbo].[DailyStatsPerStock]
